<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header">
	<link rel="stylesheet" href="/js/plugins/layer/laydate/skins/default/laydate.css" />
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<div class="form-group">	
								<label class="col-sm-3 control-label">单据编号：</label>
								<div class="col-sm-8">
									<input id="ordernumber" name="ordernumber" class="form-control" type="text" readonly>
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">折扣 1-100：</label>
								<div class="col-sm-8">
									<input id="orderdiscount" name="orderdiscount" class="form-control" onkeyup="value=value.replace(/[^\d]/g,'')" value="100" type="text" min="1" max="100">
								</div>
							</div>

							<div class="form-group">
								<input type="hidden" name="pId" id="pId" value="" oninput="getsum()">
								<label class="col-sm-3 control-label">选择商品：</label>
								<div class="col-sm-8">
									<input class="form-control" type="text" onclick="opengoods()"
										   readonly="readonly" placeholder="选择商品">
								</div>
								<div>
									<table id="goodsTable" data-mobile-responsive="true">
									</table>
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">是否送货：</label>
								<div class="col-sm-8">
									<input id="isdelivery" name="isdelivery"  type="checkbox" value="1" onclick="opendelivery(this)">送货
									<input type="hidden" value="" name="deliverytime" id="deliverytime">
									<input type="hidden" value="" name="customercontact" id="customercontact">
									<input type="hidden" value="" name="contactnumber" id="contactnumber">
									<input type="hidden" value="" name="deliveryaddress" id="deliveryaddress">
									<input type="hidden" value="" name="relevance" id="relevance">
								</div>
							</div>

														<div class="form-group">	
								<label class="col-sm-3 control-label">销售类型：</label>
								<div class="col-sm-8">
									<input name="typeofsale"  type="radio" value="1" checked>零售
									<input name="typeofsale" type="radio" value="2">批发
								</div>
							</div>
							<div class="form-group">
								<input type="hidden" name="handledby" id="handledby">
								<label class="col-sm-3 control-label">经手人：</label>
								<div class="col-sm-8">
									<input id="employeename" name="employeename" class="form-control" type="text" placeholder="请选择" readonly onclick="openemployee()">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">业务日期：</label>
								<div class="col-sm-8">
									<input id="businessdate" name="businessdate" class="laydate-icon layer-date form-control" type="text" readonly>
								</div>
							</div>
							<div class="form-group">
								<input type="hidden" name="client" id="client" value="">
								<label class="col-sm-3 control-label">客户：</label>
								<div class="col-sm-8">
									<input id="clientid" name="clientid" class="form-control" type="text" placeholder="请选择客户" readonly onclick="openclient()">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">订单状态 0关闭 1正常：</label>
								<div class="col-sm-8">
									<input name="orderstatus" type="radio" value="1" checked>正常
									<input name="orderstatus" type="radio" value="0">关闭

								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">其他费用：</label>
								<div class="col-sm-8">
									<input id="otherexpenses" name="otherexpenses" onkeyup="value=value.replace(/[^\d]/g,'')" class="form-control" type="number" value="0" oninput="getsum()">
								</div>
							</div>
							<div class="form-group">
								<input type="hidden" name="settlementaccount" id="settlementaccount" value="">
								<label class="col-sm-3 control-label">结算方式：</label>
								<div class="col-sm-8">
									<input id="byid" name="byid	" class="form-control" placeholder="请选择" type="text" readonly onclick="openbytype()">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">总计金额：</label>
								<div class="col-sm-8">
									<input id="totalamount" name="totalamount" class="form-control" value="0" type="text" readonly>
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">定金：</label>
								<div class="col-sm-8">
									<input id="orderearnest" name="orderearnest" class="form-control" type="text" value="0">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">备注：</label>
								<div class="col-sm-8">
									<input id="ordercomment" name="ordercomment" class="form-control" type="text">
									<input id="" name="isdelivery" type="hidden" value="1">
								</div>
							</div>
																					<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/appjs/sell/order/add.js">
	</script>
	<script type="text/javascript" src="/js/plugins/layer/laydate/laydate.js" ></script>
</body>
</html>
